package io.cloud.layer.spider;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

/**
 * @author RippleChan
 * @date 2019-03-31 20:44
 */
public class JsSpider {

    public static void main(String[] args) {
        String text1 = "<ul class=\"p-drama-grid fix\"><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA3OTMzMTE4MA==.html?spm=a2h1n.8261147.reload_1.1~3~A&amp;s=4e4e42efbfbdefbfbd62\" target=\"_blank\" data-spm-anchor-id=\"a2h1n.8261147.reload_1.1~3~A\">1</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA3OTMzMTE5Mg==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">2</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA3OTMzMTE4NA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">3</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA3OTMzMTE4OA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">4</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA3OTUzMDUyMA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">5</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4MDg1NDg5Ng==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">6</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4MDg1NDg5Mg==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">7</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4MDg1NDkwOA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">8</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4MDg1NDkwNA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">9</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4MDg1NDkwMA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">10</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4Mjg3ODkyNA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">11</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4Mjg3ODkwNA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">12</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4Mjg3ODkxNg==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">13</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4Mjg3ODkyMA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">14</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4Mjg3ODkwOA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">15</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4MzkwMTIwMA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">16</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4NDgxNzQ0NA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">17</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4NDgxNzQ1Mg==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">18</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4NDgxNzQ0MA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">19</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4NDgxNzQ0OA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">20</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4NTg2NzM3Mg==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">21</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4NDgxNzQ4MA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">22</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODI3OTQ4OA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">23</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODI3OTQ3Ng==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">24</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODI3OTQ4NA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">25</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODI3OTQ4MA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">26</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODI3OTQ5Mg==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">27</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODI3OTUxMg==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">28</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODI3OTUwOA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">29</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODI3OTUwNA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">30</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODk1ODUwOA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">31</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODk1ODUxMg==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">32</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MDY5ODIwNA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">33</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA4ODI3OTUwMA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">34</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTA2MA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">35</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTA1Mg==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">36</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTA0NA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">37</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTA2NA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">38</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTA1Ng==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">39</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTA5Mg==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">40</a><i class=\"\"></i></li></ul>";
        String text2 = "<ul class=\"p-drama-grid fix\"><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTEwOA==.html?spm=a2h1n.8261147.reload_41.1~3~A&amp;s=4e4e42efbfbdefbfbd62\" target=\"_blank\" data-spm-anchor-id=\"a2h1n.8261147.reload_41.1~3~A\">41</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTEwNA==.html?spm=a2h1n.8261147.reload_41.1~3!2~A&amp;s=4e4e42efbfbdefbfbd62\" target=\"_blank\" data-spm-anchor-id=\"a2h1n.8261147.reload_41.1~3!2~A\">42</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTA5Ng==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">43</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTEwMA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">44</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MTAwMTEyNA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">45</a><i class=\"\"></i></li><li><a class=\"c555\" href=\"//v.youku.com/v_show/id_XNDA5MzUzNjU4NA==.html?s=4e4e42efbfbdefbfbd62\" target=\"_blank\">46</a><i class=\"\"></i></li></ul>";
        Document parse = Jsoup.parse(text1 + text2);
        Elements c555 = parse.getElementsByClass("c555");
        for (int i = 0; i < c555.size(); i++) {
            Element element = c555.get(i);
            String href = element.attr("href");
            System.out.println("https:" + href);
        }
    }

}
